home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crosscountry USA Photo Safari
/
Crosscountry USA Photo Safari.iso
/
Data
/
cc_base
/
pak00_16bit_f.pk3
/
map_actor_city.c4
< prev
next >
Wrap
Text File
|
2003-01-02
|
2KB
|
56 lines
{
@draw {
resid font_id;
resid map_id;
int x;
int y;
str name;
font_id = ResByName("font/verdana_9_black.tf");
x = ResPropGetInt(SELF, "ScreenX");
y = ResPropGetInt(SELF, "ScreenY");
x += ResPropGetInt(SELF, "text_x");
y += ResPropGetInt(SELF, "text_y");
name = ResPropGetStr(SELF, "name");
DrawTextStr(font_id, x, y, "%s", name);
}
@mouseenter {
ResPropSetResID(SELF, "AnimationID", ResPropGetResID(SELF, "selected_dot"));
}
@mouseleave {
ResPropSetResID(SELF, "AnimationID", ResPropGetResID(SELF, "dot"));
}
@activate {
str cur_city;
resid Player;
resid city_data_id;
resid state_data_id;
resid csv_data_id;
int map_view_city_row_num;
int map_view_state_row_num;
/* get player information */
Player = ResPropGetResID(ResByName("Game"),"game_cur_player");
Release("laptop_new_city");
Mark("laptop_new_city");
cur_city = ResPropGetStr(SELF, "name");
/* get player view city information */
csv_data_id = ResByName("CSVData");
city_data_id = ResPropGetResID(csv_data_id, "city_id");
state_data_id = ResPropGetResID(csv_data_id, "state_id");
map_view_city_row_num = CSVSearch(city_data_id, "name", cur_city);
ResPropSetInt(Player, "map_view_city_row_num", map_view_city_row_num);
ResPropSetStr(Player, "map_view_city", cur_city);
map_view_state_row_num = CSVSearch(state_data_id, "abbreviation", CSVGetStr(city_data_id, "state", map_view_city_row_num));
ResPropSetInt(Player, "map_view_state_row_num", map_view_state_row_num);
ResPropSetStr(Player, "map_view_state", CSVGetStr(state_data_id, "name", map_view_state_row_num));
ResParseEvent(ResByName("map.gl"), "@updateCityStateViews");
}
}